<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" href="../../layui/css/layui.css" media="all" />
	<link rel="stylesheet" href="../../css/public.css">
</head>

<body>
	<div class="layui-form">
		<blockquote class="tableHead layui-elem-quote quoteBox mod_default_box">
			<form class="layui-form layui-inline">
				<div class="layui-inline">
					<div class="layui-input-inline" style="width: 300px;">
						<input type="text" class="layui-input searchVal" placeholder="请输入搜索的商品名称" />
					</div>
					<a class="layui-btn" data-type="search">搜索</a>
				</div>
				<div class="layui-inline" style="float:right;">
					<a class="layui-btn" data-type="edit">添加商品</a>
				</div>
			</form>
		</blockquote>

		<table id="tableList" class="layui-table" lay-filter="tableList" lay-skin="line"
			lay-data="{url:baseUrl('goods'), cellMinWidth: 150, id: 'tableListTable', page:true, limits: [ 30, 50, 100],limit: 30}">
			<thead>
				<tr>
					<th lay-data="{field:'name'}">商品名称</th>
					<th lay-data="{width: 100,templet: '#templetZT'}">状态</th>
					<th lay-data="{width: 100,templet: '#templetKCLX'}">库存类型</th>
					<th lay-data="{width: 100,field:'cost_price'}">成本</th>
					<th lay-data="{width: 100,field:'starting_price'}">起拍价</th>
					<th lay-data="{width: 100,field:'protective_price'}">保护价</th>
					<th lay-data="{width: 100,field:'svaha_price'}">梭哈价</th>
					<th lay-data="{width: 100,field:'bid_increment'}">加价幅度</th>
					<th lay-data="{width: 100,field:'market_price'}">市场价</th>
					<th lay-data="{width: 120,templet: '#tableListBar'}">操作</th>
				</tr>
			</thead>
		</table>

		<!--模板-->
		<script type="text/html" id="templetZT">
			{{# if(d.repertory_type==1){ }} 										--
			{{# }else if(d.dt_freeze && new Date(d.dt_freeze) > Date.now()){ }} 	<div style="color:red">冻结中</div>
			{{# }else if(d.state==1){ }} 											<div style="color:blue">未使用</div>
			{{# }else if(d.state==2){ }} 											<div style="color:green">使用中</div>
			{{# }else{ }} 															<div style="color:gray">已售</div>
			{{# } }}			
		</script>
		<script type="text/html" id="templetKCLX">
			<div>
				{{# if(d.repertory_type==1){ }} 无限
				{{# }else{ }} 单件
				{{# } }}
			</div>
		</script>
		<script type="text/html" id="tableListBar">
			<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
			<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="del">删除</a>
		</script>

	</div>
	<script type="text/javascript" src="../../layui/layui.js"></script>
	<script type="text/javascript" src="../../js/jsCtl.js"></script>
	<script type="text/javascript" src="index.js"></script>
</body>

</html>